package com.zuoye.zuoye5;

public class Teacher extends Fu{
    private String subject;

    public void say() {
        System.out.println("开始讲课");
    }

    public Teacher() {
    }

    public Teacher(String subject) {
        this.subject = subject;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    @Override
    public void showMsg() {
        System.out.println("姓名："+ getName()+","+"年龄："+getAge()+","+"学科："+getSubject());
    }
}
